﻿@using JewererBasic
@model IList<COMPONENT_EXPORTSTAFFDETAIL>

<h2>Update Staff Export</h2>

<fieldset>
    @using (Html.BeginForm())
    {
    
        <a href="@Url.Action("TestingExportDetail", new { id = (int)ViewBag.ExportId })">
            <input type="button" value="Detail" />
        </a>
        <input type="submit" name="submit" value="Save" />
    
        @Html.Hidden("exportId", (int)ViewBag.ExportId)
    
        <fieldset>
            <table>
                <tr>
                    <td>
                        <table class="table head">
                            <tr>
                                <th style="width: 250px;">Stone Id</th>
                                <th style="width: 200px;">Exported Weight</th>
                                <th style="width: 200px;">Exported Dust</th>
                                <th style="width: 200px;">Return Weight</th>
                                <th style="width: 200px;">Reject Weight</th>
                                <th style="width: 200px;">Return Dust</th>
                            </tr>

                            @for (int i = 0; i < Model.Count; i++)
                            {
                                <tr>
                                    @Html.HiddenFor(m => m[i].IdExport)
                                    @Html.HiddenFor(m => m[i].IdComponent)
                                    @Html.HiddenFor(m => m[i].Weight)
                                    @Html.HiddenFor(m => m[i].Reason)
                                    <td style="text-align: center">@Html.DisplayFor(m => m[i].IdComponent)</td>
                                    <td style="text-align: center">@Html.DisplayFor(m => m[i].Weight)</td>
                                    <td style="text-align: center">@Html.DisplayFor(m => m[i].Dust)</td>
                                    <td style="text-align: center">@Html.EditorFor(m => m[i].ReturnWeight) @Html.ValidationMessageFor(m => m[i].ReturnWeight)</td>
                                    <td style="text-align: center">@Html.EditorFor(m => m[i].RejectWeight) @Html.ValidationMessageFor(m => m[i].RejectWeight)</td>
                                    <td style="text-align: center">@Html.EditorFor(m => m[i].ReturnDust) @Html.ValidationMessageFor(m => m[i].ReturnDust)</td>
                                </tr>
                            }
                        </table>
                    </td>
                </tr>
            </table>

        </fieldset>
    
        <input type="submit" name="submit" value="Finish" />
    }
</fieldset>
